package com.hb.trade.client.project;

import com.hb.core.pojo.parent.PageResult;
import com.hb.core.pojo.project.section.dto.ClarifyConfirmDTO;
import com.hb.core.pojo.project.section.dto.ClarifyDTO;
import com.hb.core.pojo.project.section.dto.ClarifyTemplateDTO;
import com.hb.core.pojo.project.section.dto.ProblemDTO;
import com.hb.core.pojo.project.section.entity.Problem;
import org.fzzn.core.model.msg.Message;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 澄清答疑/回复Feign
 */
@FeignClient("hb-project")
public interface ClarifyClient {

    /**
     * 保存澄清补遗
     *
     * @param clarify
     * @return
     */
    @PostMapping("/clarify/saveClarify")
    Message<ClarifyDTO> saveClarify(@RequestBody ClarifyDTO clarify);

    /**
     * 招标人查询澄清/补疑列表
     *
     * @param sectionId
     * @return
     */
    @PostMapping("/clarify/findClarifyList")
    Message findClarifyList(@RequestBody ClarifyDTO clarifyDTO);

    /**
     * 澄清补遗签章
     *
     * @param clarifyDTO
     * @return
     */
    @PostMapping("/clarify/signature")
    Message signature(@RequestBody ClarifyDTO clarifyDTO);

    /**
     * 招标人发出澄清/补疑
     *
     * @param id
     * @return
     */
    @PostMapping("/clarify/sendClarify")
    Message sendClarify(@RequestParam Long id);

    /**
     * 投标人查询澄清/补疑列表
     *
     * @param sectionId 标段Id
     * @param tenderId  投标人Id
     * @return
     */
    @PostMapping("/clarify/findBidderClarifyList")
    Message<PageResult<ClarifyDTO>> findBidderClarifyList(@RequestBody ClarifyDTO clarifyDTO);

    /**
     * 投标人确认
     *
     * @param id
     * @return
     */
    @PostMapping("/clarify/confirmClarify")
    Message confirmClarify(@RequestBody ClarifyConfirmDTO clarifyConfirm);

    /**
     * 查看澄清/补疑
     *
     * @param id  澄清补遗主键Id
     * @return
     */
    @GetMapping("/clarify/findClarifyById")
    Message<ClarifyDTO> findClarifyById(@RequestParam Long id);


    /**
     * @param clarifyDTO:
     * @Description:招标人查看澄清补疑回执列表
     * @Author: zhongdl
     * @Date:2022/5/20 11:35

     * @return: {@link org.fzzn.core.model.msg.Message<com.hb.core.pojo.parent.PageResult<com.hb.core.pojo.project.section.dto.ClarifyConfirmDTO>> }
     **/
    @PostMapping("/clarify/pageClarifyConfirm")
    Message<PageResult<ClarifyConfirmDTO>> pageClarifyConfirm(@RequestBody ClarifyDTO clarifyDTO);

    /**
     * 供应商提出问题
     *
     * @param problem
     * @return
     */
    @PostMapping("/problem/saveProblem")
    Message saveProblem(@RequestBody ProblemDTO problem);

    /**
     * 供应商提出问题列表(投标人用)
     *
     * @param problem
     * @author zhongdl
     * @return
     */
    @PostMapping("/problem/findProblemListBySectionId")
    Message<PageResult<ProblemDTO>> findProblemListBySectionId(@RequestBody ProblemDTO problem);

    /**
     * 供应商发出问题
     *
     * @param id 提出问题id
     * @return
     */
    @PostMapping("/problem/sendOutProblem")
    Message sendOutProblem(@RequestParam Long id);

    /**
     * 供应商提出问题列表(招标人用)
     *
     * @param problem
     * @author zhongdl
     * @return
     */
    @PostMapping("/problem/findBiddingProblemListBySectionId")
    Message<PageResult<ProblemDTO>> findBiddingProblemListBySectionId(@RequestBody ProblemDTO problem);

    /**
     * 招标人回复问题
     *
     * @param problem
     * @return
     */
    @PostMapping("/problem/replyProblem")
    Message replyProblem(@RequestBody ProblemDTO problem);

    /**
     * 投标人回执问题
     *
     * @param problem
     * @return {@link jnpf.base.ActionResult}
     * @author zhongdl
     */
    @PostMapping("/problem/receiptProblem")
    Message receiptProblem(@RequestBody ProblemDTO problem);

    /**
     * 查看问题
     *
     * @param id
     * @return {@link jnpf.base.ActionResult}
     * @author zhongdl
     */
    @GetMapping("/problem/findProblem")
    Message findProblem(@RequestParam Long id);

    /**
     *
     * @Description: 查看问题
     * @Author: zhongdl
     * @Date:2022/2/19 17:55
     * @param id:
     * @return: {@link Message< Problem> }
     **/
    @GetMapping("/problem/getProblemById")
    Message<Problem> getProblem(@RequestParam Long id);

    /**
     * @Description: 查询投标人澄清回执word模版需要的信息
     *
     * { 澄清代理公司、 项目名称、 当前时间(xxxx年xx月xx日)、 回执企业 }
     *
     * @author yuezheng
     * @param
     * @return org.fzzn.core.model.msg.ResponseDto
     * @date 2022/5/23 13:48
     */
    @PostMapping("/clarify/template")
    Message<ClarifyTemplateDTO> findClarifyTemplateInfo(@RequestBody ClarifyDTO clarifyDTO);
}
